package org.dallasrowing.model;


public class Rower {
	private String name;
	private int id;
	private String email;
	private int level;
	private String phone;
	private boolean member;
	private boolean active;

	public Rower( int id, String name, String email, String phone, int level, boolean isMember, boolean isActive )
	{
		this.id = id;
		this.name = name;
		this.email = email;
		this.phone = phone;
		this.level = level;
		this.member = isMember;
		this.active = isActive;
	}
	
	public Rower()
	{
	}

	public String getName() {
		return name;
	}

	public int getId() {
		return id;
	}

	@SuppressWarnings( "unused" )
	private void setId(int id) {
		this.id = id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEmail() {
		return email;
	}

	public int getLevel() {
		return level;
	}

	public String getPhone() {
		return phone;
	}

	public boolean isMember() {
		return member;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public void setMember(boolean isMember) {
		this.member = isMember;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((email == null) ? 0 : email.hashCode());
		result = prime * result + id;
		result = prime * result + level;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final Rower other = (Rower) obj;
		if (email == null) {
			if (other.email != null)
				return false;
		} else if (!email.equals(other.email))
			return false;
		if (id != other.id)
			return false;
		if (level != other.level)
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
	}

	public String toString()
	{
		return new StringBuilder()
		.append("Id: ").append(id).append("\n")
		.append("Name: ").append(name).append("\n")
		.append("Email: ").append(email).append("\n")
		.append("Level: ").append(level).append("\n")
		.toString();
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public boolean getActive()
	{
		return this.active;
	}
}
